package com.ebupt.migu.music.autotri.entity;

import com.google.gson.Gson;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ResultMsg<T> {

    /**
     * 返回编码
     **/
    private String code = "0000";
    /**
     * 返回信息
     **/
    private String msg;
    /**
     * 数据
     */
    private T data;

    /**
     * to Json
     *
     * @return
     */
    public String toJson(){
        Gson gson = new Gson();
        return gson.toJson(this);
    }

}
